import request from '@/utils/request'

// 查询支付协议列表
export function listPayment(query) {
  return request({
    url: '/bargain/payment/list',
    method: 'get',
    params: query
  })
}

// 查询支付协议详细
export function getPayment(paymentAgreementId) {
  return request({
    url: '/bargain/payment/' + paymentAgreementId,
    method: 'get'
  })
}

// 新增支付协议
export function addPayment(data) {
  return request({
    url: '/bargain/payment',
    method: 'post',
    data: data
  })
}

// 修改支付协议
export function updatePayment(data) {
  return request({
    url: '/bargain/payment',
    method: 'put',
    data: data
  })
}

// 删除支付协议
export function delPayment(paymentAgreementId) {
  return request({
    url: '/bargain/payment/' + paymentAgreementId,
    method: 'delete'
  })
}
